package com.youha.demo;

import com.youha.dao.UserDao;
import com.youha.service.UserService;
import com.youha.service.impl.UserServiceImpl;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author youha
 * @create 2021-08-15 10:43
 */
public class UserServlet {

    public static void main(String[] args) {
//        UserService userService = new UserServiceImpl();
//        userService.save();
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");

        UserService userService = (UserService) applicationContext.getBean("userService");

        userService.save();

    }



}
